<%@page import="com.buss.core.dic.MenuType"%>
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@include file="../includes/tag.jsp" %>
<%@taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<form:form name="purchaseorder_edit" action="" commandName="orderMaster"  style="margin-top:10px;">
	<form:hidden path="id"/>
	<div>
		<table width="100%" align="center" cellpadding="0" cellspacing="8">
		  <tr>
		  	<td align="right">订单号：</td>
		  	<td align="left">
		  		<form:input path="orderNumber" size="30"  cssClass="text"/>
		  	</td>
		  	<td align="right">库房：</td>
			<td align="left">
				<form:hidden path="branch.id"/>
				<form:input path="branch.name" size="22" cssClass="text" readonly="true"/>
		  		<%--<form:select path="branch.id" itemLabel="name" itemValue="id" items="${branchs}" cssStyle="width: 128px;"/> --%>		  		
		  	</td>
		  	<td align="right">业务员：</td>
		  	<td align="left">
		  		<form:hidden path="salesManName"/>
		  		<form:select path="salesManId" itemLabel="userName" itemValue="id" items="${users }" cssStyle="width: 128px;"/>		  	
		  	</td>
		  </tr>
		  <tr>
		  	<td align="right">供货商：</td>
		  	<td align="left">
		  		<form:hidden path="supplier.id"/>
		  		<form:input path="supplier.name" size="30" cssClass="text" readonly="true"/><a id="sel_supplier" href="javascript:void(0);">选择</a>
		  	</td>
		  	<td align="right">订单日期：</td>
		  	<td align="left">
		  		<form:input path="orderDate" size="19" cssClass="Wdate" onfocus="WdatePicker({isShowClear:false,readOnly:true,isShowClear:true})"/>
		  	</td>
		  	<td align="right">预计到货日期：</td>
		  	<td align="left">
		  		<form:input path="predictArriveDate" size="17" cssClass="Wdate" onfocus="WdatePicker({isShowClear:false,readOnly:true,isShowClear:true})"/>
		  	</td>
		  </tr>
		  <tr>
		  	<td align="right">订单备注：</td>
		  	<td align="left" colspan="5">
		  		<form:input path="intro" size="74" cssClass="text"/>
		  	</td>
		  </tr>
		</table>
	</div>
	<div style="margin-left:20px;">
    	<table height="100%" cellpadding="0" cellspacing="0">
    		<tr>
    			<td valign="middle">
    				<a id="sel-product-btn" href="javascript:void(0);">增加商品</a>
    			</td>
    			<td valign="middle"" style="padding-left:5px;">
    				<a id="del-product-btn" href="javascript:void(0);">删除商品</a>
    			</td>
    			<td valign="middle"" style="padding-left:5px;">
    				<a id="query-product-btn" href="javascript:void(0);">条码查询</a>
    			</td>
    		</tr>
    	</table>
    </div>
    <div class="product_detail_list" style="height:270px;margin:20px;margin-top:10px;margin-bottom:10px;">
    	<table id="product_tabledata"></table>
    </div>
    <div class="master_checkinfo">
    	<div style="float:right;">
    		<table cellpadding="0" cellspacing="8"  align="center">
    			<td align="right">优惠金额：</td>
    			<td align="left">
    				<form:input path="allowance" readonly="true" size="15" cssClass="text" style="border-top:none;border-right:none;border-left:none;background:none;"/>
    			</td>
    			<td align="right">优惠后金额：</td>
    			<td align="left">
    				<form:input path="amount" readonly="true" size="15" cssClass="text" style="border-top:none;border-right:none;border-left:none;background:none;"/>
    			</td>    		
    		</table>
    	</div>
    	<c:if test='${type=="viewpage" }'>
	    	<div>
	    		<table cellpadding="0" cellspacing="8"  align="left">
	    			<tr>
	    				<td align="right">制单人：</td>
		    			<td align="left">	
		    				<input type="text" readonly="readonly" size="15" value="${createUserName}"  class="text"/>
		    			</td>
		    			<td align="right">制单时间：</td>
		    			<td align="left">
		    				<input type="text" readonly="readonly" size="15" value="${createDate }"  class="text"/>
		    			</td>
		    			<td align="right">审核状态：</td>
		    			<td align="left">
		    				<input type="text" readonly="readonly" size="15" value="${checkStatus.value}"  class="text"/><a href="#">详情</a>
		    			</td>
		    		</tr>
	    		</table>
	    	</div>
    	</c:if>
    </div>
    <div style="display:none;" id="removeDetailIds">
    </div>
</form:form>
